<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>JGoodies Forms :: Reference :: Component Sizes</title>
        <link rel="stylesheet" type="text/css" href="../style.css" >
	<meta name="description" content="The JGoodies Forms helps you layout and implement elegant Panel quickly and consistently.">
	<meta name="author"	 content="Karsten Lentzsch">
	<meta name="keywords"	 content="JGoodies Forms Java Layout Swing UI Design Usability Lentzsch Kiel">
	<meta name="robots"	 content="index, follow">
	<meta name="date"	 content="2003-07-31">
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0" bottommargin="0" >

<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
    <td colspan="3" bgcolor="DDDCDC"><a href="../../README.html"><img 
	src="../images/banner.gif" width="436" height="46" alt=":: JGOODIES :: Forms" border="0"></a></td>
</tr>
<tr>
    <td colspan="3" height="1" bgcolor="C9C8C8"></td>
</tr>
<tr>
    <td width="160" height="500" valign="top" bgcolor="F4f3f3" class="nav" nowrap="nowrap">
    <div style="margin-left: 17px; margin-top: 17px; margin-right: 10px; ; margin-bottom: 17px; line-height: 18px;">

        <!-- ************ Anfang der Seitennavigation **************************** -->

	<b>General</b>
	<br>::&nbsp;<a class="nav" href="../../README.html">Readme</a>
	<br>::&nbsp;<a class="nav" href="../../RELEASE-NOTES.txt">Release Notes</a>
	<br>::&nbsp;<a class="nav" href="../../LICENSE.txt">License</a>
	<br>::&nbsp;<a class="nav" href="../whitepaper.pdf">Whitepaper</a>
	<br>::&nbsp;<a class="nav" href="../visualbuilders.html">Visual Builders</a>
	<br>::&nbsp;<a class="nav" href="../references.html">References</a>
	<br>::&nbsp;<a class="nav" href="../tips.html">Tips &amp; Tricks</a>
	<br>::&nbsp;<a class="nav" href="http://www.jgoodies.com/freeware/libraries/forms/faq/">FAQ</a>
	<p>
	<b>Reference</b>
	<br>::&nbsp;<a class="nav" href="alignments.html">Alignments</a>
	<br>::&nbsp;<a class="nav" href="constantsizes.html">Constant Sizes</a>
	<br>::&nbsp;<a class="nav" href="componentsizes.html"><b>Component Sizes</b></a>
	<br>::&nbsp;<a class="nav" href="boundedsizes.html">Bounded Sizes</a>
	<br>::&nbsp;<a class="nav" href="colsandrows.html">Cols &amp; Rows</a>
	<br>::&nbsp;<a class="nav" href="cells.html">Cell Constraints</a>
	<br>::&nbsp;<a class="nav" href="groups.html">Groups</a>
	<br>::&nbsp;<a class="nav" href="variables.html">Layout Variables</a>
	<p>
	<a class="nav" href="../api/index.html"><b>API Docs</b></a>
	<p>
    <b>Web Pages</b>
    <br>::&nbsp;<a class="nav" href="http://java.net/projects/forms/">Project Home</a>
    <br>::&nbsp;<a class="nav" href="http://www.jgoodies.com/downloads/libraries/">Download</a>
    <br>::&nbsp;<a class="nav" href="http://www.jgoodies.com/downloads/archive/">Archive</a>
    <br>::&nbsp;<a class="nav" href="http://java.net/projects/forms/lists">Mailing Lists</a>
    <br>::&nbsp;<a class="nav" href="http://java.net/jira/browse/FORMS">Issue Tracker</a>
        
         <!-- *********** Ende der Seitennavigation ******************************* -->

    </div>
    </td>
    <td width="1" bgcolor="E7E5E5"><img src="/images/banner.gif" width="1" height="1" alt=""></td>
    <td width="90%" valign="top" >
	<div style="margin-left: 20px; margin-top: 17px; margin-bottom: 17px">

        <!-- ************ Anfang des Inhalts ***************************************** -->
	
	<table width="530" border="0" cellspacing="0" cellpadding="0">
	<tr>
	  <td>
	<h1>:: Reference :: Component Sizes ::</h1>

	The component sizes <i>min, pref, default</i> are used 
	to set column and row sizes that reflect the minimum 
	or preferred sizes of the contained components.
	
	<p>
	If you specify a column size as <i>min</i> sized, FormLayout will
	ask all components in that column for their minimum width
	and chooses the largest width as the column width.
	The same applies to rows and the <i>pref</i> component size.
	
	<p>
	The <i>default</i> size aims to give a column the width 
	of the largest preferred width. If container space is scarce,
	it shrinks the column down to the largest minimum width.
	
<!--	<p>
	<table border="1" cellspacing="0" cellpadding="3">
	<tr>
		<td>Layout Task</td>
		<td><tt>constant</tt></td>
		<td><tt>min</tt></td>
		<td><tt>pref</tt></td>
		<td><tt>default</tt></td>
	</tr>
	<tr>
		<td>Get minimum size</td>
		<td>constant</td>
		<td>minimum</td>
		<td>preferred</td>
		<td>minimum</td>
	</tr>
	</table>

// -->	

	
	<h2>String Representations</h2>
	
	I recommend to specify column and row sizes in 
	the FormLayout constructor using string representations.
	These strings will be accepted by the <tt>FormLayout</tt>,
	<tt>ColumnSpec</tt>, <tt>RowSpec</tt> and <tt>Borders</tt> classes.
	
<pre>
componentSize ::= MIN | PREF | DEFAULT | M | P | D 
</pre>


	<h2>Examples</h2><pre>
new ColumnSpec("min");
new ColumnSpec("m");
new ColumnSpec("default");
new ColumnSpec("d");
new ColumnSpec("pref");
new ColumnSpec("p");

new RowSpec("min");
new RowSpec("m");

new FormLayout("left:pref, 4dlu, fill:default", 
               "p, 3dlu, p, 3dlu, p");
</pre>	




	</td>
	</tr>
	</table>


        <!-- ************ Ende des Inhalts ************************************** -->
	</div>
    </td>
</tr>

<tr>
    <td nowrap="nowrap" bgcolor="F4f3f3">
      <div style="font-size: 10px; margin-left: 17px; margin-top: 20px; margin-right: 10px; margin-bottom: 4px;">
      (c) 2014 JGoodies
      </div>
    </td>
    <td width="1" bgcolor="E7E5E5"></td>
    <td>&nbsp;</td>
</tr>
<tr>
    <td colspan="2" height="1" bgcolor="E7E5E5"></td>
    <td></td>
</tr>

</table>

</body>
</html>
